﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PrinteMaster
{
    public partial class 修改密码窗口 : Form
    {
        private string m_lpstrIDHint, m_lpstrPWHint,m_lpstrNewPwHint,m_lpstrNewPwHintRe;
        public 修改密码窗口()
        {
            InitializeComponent();
            m_lpstrIDHint = textBox账号.Text;
            m_lpstrPWHint = textBox密码.Text;
            m_lpstrNewPwHint = textBox新密码.Text;
            m_lpstrNewPwHintRe = textBox确认新密码.Text;
        }

        #region 全局静态函数
        public static 修改密码窗口 create(主窗口 window)
        {
            修改密码窗口 x = new 修改密码窗口();
            x.Location = window.Location;
            x.ShowDialog(window);
            return x;
        }
        #endregion

        #region 事件映射
        private void textBox密码_Enter(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox密码, m_lpstrPWHint);
        }

        private void textBox密码_Leave(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox密码, m_lpstrPWHint);
        }

        private void textBox账号_Enter(object sender, EventArgs e)
        {
            Function.inputText(textBox账号, m_lpstrIDHint);
        }

        private void textBox账号_Leave(object sender, EventArgs e)
        {
            Function.inputText(textBox账号, m_lpstrIDHint);
        }
        

        private void textBox确认新密码_Enter(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox确认新密码, m_lpstrNewPwHintRe);
        }

        private void textBox确认新密码_Leave(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox确认新密码, m_lpstrNewPwHintRe);
        }

        private void textBox新密码_Enter(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox新密码, m_lpstrNewPwHint);
        }

        private void textBox新密码_Leave(object sender, EventArgs e)
        {
            Function.inputPassWord(textBox新密码, m_lpstrNewPwHint);
        }
        #endregion

        private void btn登陆_Click(object sender, EventArgs e)
        {
            

        }

        private void 修改密码窗口_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn登陆_Click(null, null);

        }

        private void textBox确认新密码_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn登陆_Click(null, null);
        }

        private void textBox新密码_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn登陆_Click(null, null);
        }

        private void textBox密码_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn登陆_Click(null, null);
        }

        private void textBox账号_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btn登陆_Click(null, null);
        }
    }
}
